public class TestDemo {
    public static void main(String[] args) {
        //创建
        SingleLinkedList singleLinkedList = new SingleLinkedList();
        singleLinkedList.createList();
        singleLinkedList.display();

        //查找与大小
        System.out.println(singleLinkedList.contains(34));
        System.out.println(singleLinkedList.size());

        //头插
        singleLinkedList.addFirst(99);
        singleLinkedList.display();

        //尾插
        singleLinkedList.addLast(99);
        singleLinkedList.display();

        //中间插
        singleLinkedList.addIndex(3, 99);
        singleLinkedList.display();

        //删除单个
        singleLinkedList.remove(99);
        singleLinkedList.display();

        //有序插入一个数
        singleLinkedList.insIndex(40);
        singleLinkedList.display();

        //删除所有
        singleLinkedList.removeAllKey(99);
        singleLinkedList.display();

        //清空
        singleLinkedList.clear();
        singleLinkedList.display();
    }
}
